package com.example.schoolexam2.service.impl;

import com.example.schoolexam2.entity.PageVO;
import com.example.schoolexam2.mapper.PageMapper;
import com.example.schoolexam2.service.PageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class PageServiceImpl implements PageService {
    @Autowired
    PageMapper pagemapper;

    @Override
    public List<PageVO> selectPages(String pname) {
        List<PageVO> list = pagemapper.selectPagesByConditions(pname);
        return list;
    }

    @Override
    public int getPageCount(String pname) {
        return pagemapper.getPageCount(pname);
    }

    @Override
    public int addPage(PageVO page) {
        return pagemapper.addPage(page);
    }

    @Override
    public int updatePage(PageVO page) {
        return pagemapper.updatePage(page);
    }

    @Override
    public int deletePage(PageVO page) {
        return pagemapper.deletePage(page);
    }

}
